#ifndef __MD5_H__
#define __MD5_H__
#include "duktape.h"
/**************************************************************************
 * MD5 declarations 
 **************************************************************************/

#define MD5_SIZE    16

typedef struct 
{
  duk_uint32_t state[4];        /* state (ABCD) */
  duk_uint32_t count[2];        /* number of bits, modulo 2^64 (lsb first) */
  duk_uint8_t buffer[64];       /* input buffer */
} MD5_CTX;

void MD5_Init(MD5_CTX *);
void MD5_Update(MD5_CTX *, const duk_uint8_t *msg, int len);
void MD5_Final(duk_uint8_t *digest, MD5_CTX *);

#endif //__MD5_H__